package com.zcwin.runner.sms.bean;

import com.zcwin.runner.utils.GUID;

/**
 *
 * 待发短信信息表
 * @author 王士江
 * @version 1.0
 */
public class SendSmsBean {
	private String url;
    private String destAddr;//接受单位手机号码
    private String content;
    private String sendTime = "";
    private String rid = "";
    private String smsid = "";
    private int clcount = 0;
    private int retry = 3;
    private int txinterval = 1;
    private int smsclcount = 10;//短信状态回收处理次数，先设定这个值，可根据具体情况在修改，同时短信发送出去后延时2分钟再去回收状态
    private int smscallback = 2;//短信发送出去后间隔一定时间再去回收状态，以分钟为单位，暂时默认2分钟
    private String fileno = "";//文件编号
    private String mfrom = "";//发件单位
    private String mailmjname = "";//密级名称
    private String prioname = "";//紧急程序名称
    private String sendtime = "";//发件时间
       
    public String getSMSInfo()
    {
    	String rtnStr = this.fileno;
    	rtnStr = "["+this.prioname+"]"+(fileno!=null && !"".equals(fileno)?this.fileno:"有新")+"文件已发送至你单位，请登录安全电子文件交换系统接收。["+this.mfrom+"]";
    	return rtnStr;
    }
    
    public void putData(SmsServerConfig config)
    {
    	this.url = config.getUrl();
        this.retry = config.getRetry();
        this.smsclcount = config.getSmsclcount();
        this.smscallback = config.getSmscallback();
        this.txinterval = config.getTxinterval();
        this.smsid = new GUID().toString();
    }

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getDestAddr() {
		return destAddr;
	}

	public void setDestAddr(String destAddr) {
		this.destAddr = destAddr;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getSendTime() {
		return sendTime;
	}

	public void setSendTime(String sendTime) {
		this.sendTime = sendTime;
	}

	public String getRid() {
		return rid;
	}

	public void setRid(String rid) {
		this.rid = rid;
	}

	public String getSmsid() {
		return smsid;
	}

	public void setSmsid(String smsid) {
		this.smsid = smsid;
	}

	public int getClcount() {
		return clcount;
	}

	public void setClcount(int clcount) {
		this.clcount = clcount;
	}

	public int getRetry() {
		return retry;
	}

	public void setRetry(int retry) {
		this.retry = retry;
	}

	public int getTxinterval() {
		return txinterval;
	}

	public void setTxinterval(int txinterval) {
		this.txinterval = txinterval;
	}

	public int getSmsclcount() {
		return smsclcount;
	}

	public void setSmsclcount(int smsclcount) {
		this.smsclcount = smsclcount;
	}

	public int getSmscallback() {
		return smscallback;
	}

	public void setSmscallback(int smscallback) {
		this.smscallback = smscallback;
	}

	public String getFileno() {
		return fileno;
	}

	public void setFileno(String fileno) {
		this.fileno = fileno;
	}

	public String getMfrom() {
		return mfrom;
	}

	public void setMfrom(String mfrom) {
		this.mfrom = mfrom;
	}

	public String getMailmjname() {
		return mailmjname;
	}

	public void setMailmjname(String mailmjname) {
		this.mailmjname = mailmjname;
	}

	public String getPrioname() {
		return prioname;
	}

	public void setPrioname(String prioname) {
		this.prioname = prioname;
	}

	public String getSendtime() {
		return sendtime;
	}

	public void setSendtime(String sendtime) {
		this.sendtime = sendtime;
	}
}
